<include file="Public:pagerForm" />

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="__URL__" method="post">
	<div class="searchBar">
		<ul class="searchContent">
			<li>
				<label>配送时间：</label>
				<input type="text" name="dispatch_datetime" class="date" dateFmt="yyyy-MM-dd" readonly="true" value="<?php echo $_REQUEST['dispatch_datetime']?>" />
				<a class="inputDateButton" href="javascript:;">选择</a>
			</li>
		</ul>
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>
</div>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="icon" target="dwzExport" href="__URL__/Export"><span> 导出EXCEL </span></a></li>
			<li class="line">line</li>
			<php>if(in_array($_SESSION['account'],array('admin','cangku'))){</php>
			<li><a class="edit" href="__URL__/setship/id/{id}" target="dialog" width="600" height="240" mask="true" warn="请选择数据"><span>设置快递信息</span></a></li>
			
			<li><a class="edit" href="__URL__/shipmsg/id/{id}" target="dialog" width="600" height="240" mask="true" warn="请选择数据"><span>通知发货</span></a></li>
			
			<li><a class="edit" href="__URL__/usersign/id/{id}" target="ajaxTodo" title="请确认用户签收后操作" warn="请选择数据"><span>完成配送</span></a></li>
			<php>}</php>
		</ul>
	</div>

	<table class="table" width="100%" layoutH="138">
		<thead>
		<tr>
			<th width="100">配送流水</th>
			<!--<th width="100">订单编号</th>-->
			<th width="150">订单详情</th>
			<th width="50" >收货人</th>
			<th width="100" >地址</th>
			<th width="100" >收货手机</th>
			<th width="50" >快递公司</th>
			<th width="100" >快递单号</th>
			<th width="100" >状态</th>
		</tr>
		</thead>
		<tbody>
		<volist id="vo" name="list">
			<tr target="id" rel="{$vo['ship_id']}">
				<td>{$vo['ship_id']}</td>
				<!--<td>{$vo['order_id']}</td>-->
				<td>
				<?php
					$order_detail = "";
					foreach($order_commodity[$vo['order_id']] as $od){
						if($order_detail == "")
						$order_detail = $od['name']."(".$od['spec'].") ".num_f($od['order_num']).$od['unit_name'];
						else 
						$order_detail .= ",".$od['name']."(".$od['spec'].") ".num_f($od['order_num']).$od['unit_name'];
					}
					echo $order_detail;
				?>
				</td>
				<td>{$vo['consignee']}</td>
				<td><?php echo $city_kv[$vo['city']]." ".$district_kv[$vo['district']]." ".$vo['address'] ?></td>
				<td>{$vo['mobile']}</td>
				<td>
					<?php 
						if(!empty($vo['tracking_com']))echo C('SHIP_COM_CODE.'.$vo['tracking_com']);
					?>
				</td>
				<td>{$vo['tracking_nu']}</td>
				<td>
					<?php echo C('SHIP_STATUS_NAME.'.$vo['ship_status']);?>
				</td>
			</tr>
		</volist>
		</tbody>
	</table>

	<div class="panelBar">
		<div class="pages">
			<span>共{$totalCount}条</span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$currentPage}"></div>
	</div>

</div>


